#include "../inc/TargetCamera.h"

void TargetCamera::setupCamera()
{
  CoordF cTarget;
  
  if (dTarget) cTarget = dTarget->getPos();
  cTarget += o;
  
//  Camera::setupCamera();

  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  
  gluPerspective(fov, ar, neardist, fardist);
  gluLookAt(cPos.x, cPos.y, cPos.z, cTarget.x, cTarget.y, cTarget.z, upVec.x, upVec.y, upVec.z);
  
  glMatrixMode(GL_MODELVIEW);
  glLoadIdentity();

}
